package com.triptogether.utils.db.models;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable(tableName = Product.TABLE_NAME)
public class Product {

	public static final String TABLE_NAME = "Products";
	public static final String SHOPPING_LIST_COLUMN = "shoppingList";

	@DatabaseField(generatedId = true)
	private long id;
	@DatabaseField
	private String productName;
	@DatabaseField(foreign = true, columnName = SHOPPING_LIST_COLUMN)
	private ShoppingList shoppingList;
	@DatabaseField
	private boolean isBought;

	public Product() {}

	public Product(String value) {
		setProductName(value);
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	public ShoppingList getShoppingList() {
		return shoppingList;
	}

	public void setShoppingList(ShoppingList shoppingList) {
		this.shoppingList = shoppingList;
	}

	public boolean isBought() {
		return isBought;
	}

	public void setBought(boolean isBought) {
		this.isBought = isBought;
	}

}
